home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk1.zip / LST7-20.ASM < prev    next >
Assembly Source File  |  1990-02-15  |  385b  |  20 lines

  1. ;
  2. ; *** Listing 7-20 ***
  3. ;
  4. ; Measures the performance of multiplying by 80 with
  5. ; shifts and adds.
  6. ;
  7.     sub    ax,ax
  8.     call    ZTimerOn
  9.     rept    1000
  10.     mov    ax,10    ;so we have a constant value to
  11.             ; multiply by
  12.     mov    cl,4
  13.     shl    ax,cl    ;times 16
  14.     mov    cx,ax    ;set aside times 16
  15.     shl    ax,1    ;times 32
  16.     shl    ax,1    ;times 64
  17.     add    ax,cx    ;times 80 (times 64 + times 16)
  18.     endm
  19.     call    ZTimerOff
  20.